<?php

namespace Tests\Browser\Pages\Admin\Customer;

use Laravel\Dusk\Browser;
use Tests\Browser\Pages\Page;

class SkinTestPage extends Page
{
    /**
     * Get the URL for the page.
     *
     * @return string
     */
    public function url()
    {
        return '/web-admin/#/customer/skin-test';
    }

    /**
     * Assert that the browser is on the page.
     *
     * @param  Browser $browser
     * @return void
     */
    public function assert(Browser $browser)
    {
//        $browser->assertPathIs($this->url());
    }

    /**
     * Get the element shortcuts for the page.
     *
     * @return array
     */
    public function elements()
    {
        return [
            '@hm'              => '.ivu-tabs-nav div:nth-last-of-type(2)',
            '@water'           => '.v-component-tab > div:nth-last-of-type(3)',
            '@oil'             => '.v-component-tab > div:nth-last-of-type(2)',
            '@flex'            => '.v-component-tab > div:nth-last-of-type(1)',
            '@hm-eye'          => 'div.chart > div:nth-child(1)',
            '@hm-see'          => 'div.ivu-modal-body > div > div.user-index > div > div > div > div.ivu-table-body > table > tbody > tr > td:nth-child(7) > div > div > button',
            '@hm-return'       => 'div.main-content > div > div.user-detail > div.return-btn > i',
            '@hm-X'            => 'div.ivu-modal-wrap.vertical-middle-modal.user-modal > div > div > a',
            '@wax'             => '.ivu-tabs-nav div:last-of-type',
            '@wax-oil'         => 'div.ivu-tabs-content.ivu-tabs-content-animated > div:nth-child(3) > div.v-component-tab > div:nth-last-of-type(5)',
            '@wax-water'       => 'div.ivu-tabs-content.ivu-tabs-content-animated > div:nth-child(3) > div.v-component-tab > div:nth-last-of-type(4)',
            '@wax-redblood'    => 'div.ivu-tabs-content.ivu-tabs-content-animated > div:nth-child(3) > div.v-component-tab > div:nth-last-of-type(3)',
            '@wax-pigment'     => 'div.ivu-tabs-content.ivu-tabs-content-animated > div:nth-child(3) > div.v-component-tab > div:nth-last-of-type(2)',
            '@wax-follicle'    => 'div.ivu-tabs-content.ivu-tabs-content-animated > div:nth-child(3) > div.v-component-tab > div:nth-last-of-type(1)',
            '@user_index_view' => 'button[name=user_index__view]',
        ];
    }
}
